package Lee_code;

import java.util.HashMap;

/**
 * @author blh
 * @date 2024年10月22日 9:12
 */
public class Lee_3184_1022 {
    public int countCompleteDayPairs(int[] hours) {
        HashMap<Integer, Integer> hashMap = new HashMap<>();
        int res = 0;

        for (int hour : hours) {
            int yuShu = hour % 24;
            res = res + hashMap.getOrDefault((24 - yuShu) % 24, 0);
            hashMap.put(yuShu, hashMap.getOrDefault(yuShu, 0) + 1);
        }
        return res;
    }

    public static void main(String[] args) {
        Lee_3184_1022 method = new Lee_3184_1022();
        method.countCompleteDayPairs(new int[]{11, 11, 24});
    }
}
